<fieldset>
    <legend>条件搜索</legend>
    <form action="{:sysuri()}" autocomplete="off" class="layui-form layui-form-pane form-search" method="get" onsubmit="return false">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">用户手机</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="phone" placeholder="请输入用户手机" value="{$get.phone|default=''}">
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">用户昵称</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="username" placeholder="请输入用户昵称" value="{$get.username|default=''}">
            </label>
        </div>

        <!--{notempty name='upgrades'}-->
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">用户等级</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="vip_code">
                    <option value="">-- 全部 --</option>
                    {foreach $upgrades as $upgrade}{if input('vip_code') eq $upgrade.number.''}
                    <option selected value="{$upgrade.number|default=0}">[ VIP{$upgrade.number|default='0'} ] {$upgrade.name|default=''}</option>
                    {else}
                    <option value="{$upgrade.number|default=0}">[ VIP{$upgrade.number|default='0'} ] {$upgrade.name|default=''}</option>
                    {/if}{/foreach}
                </select>
            </div>
        </div>
        <!--{/notempty}-->

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">代理手机</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="from_phone" placeholder="请输入代理手机" value="{$get.from_phone|default=''}">
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">代理昵称</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="from_username" placeholder="请输入代理昵称" value="{$get.from_username|default=''}">
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">使用状态</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="status">
                    <option value="">-- 全部 --</option>
                    {foreach ['已冻结的用户', '已激活的用户'] as $k=>$v}
                    {if $k.'' eq input('status')}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">注册时间</label>
            <div class="layui-input-inline">
                <input class="layui-input" data-date-range name="create_at" placeholder="请选择注册时间" value="{$get.create_at|default=''}">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
        </div>
    </form>

</fieldset>
